<?php

require 'php/init.php';

Session::init();
Utils::handleFormAction(@$_GET['_'], $_POST);

?>
<?php include 'php/inc/header.php'; ?>
<?php 

$p = isset($_GET['p']) && !empty($_GET['p']) 
		&& file_exists('php/pages/'.$_GET['p'].'.php') 
		? $_GET['p'] 
		: 'login';

?>
<?php include 'php/pages/'.$p.'.php'; ?>
<?php include 'php/inc/footer.php'; ?>
